package com.cyt.work.divideclass.model.po;

import com.cyt.base.util.BaseUtil;
import com.cyt.base.util.DictCode;
import com.cyt.sys.model.po.SysUser;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.Date;

/**
 * 智能分班-智能分班消息实体类
 *
 * @author caideyong
 * @date 2019-12-20 13:54:04
 */
@Data
@NoArgsConstructor
@Table(name = "cyt_divideclass_message")
public class DivideclassMessage implements Serializable {
	/**
     * 主键
     */
	@Id
	private String id;
	/**
     * 标题
     */
	@Column(name = "NAME")
	private String name;
	/**
     * 分班学段(0：学生，1：老师)
     */
	@Column(name = "TYPE")
	private String type;
	/**
     * 分班总人数
     */
	@Column(name = "CLASS_ID")
	private String classId;
	/**
     * 状态(待分班,已分班)
     */
	@Column(name = "CLASS_NAME")
	private String className;
	/**
	 * 结果状态(待发布，已发布)
	 */
	@Column(name = "CLASS_NUM")
	private String classNum;
	/**
	 * 班主任姓名
	 */
	@Column(name = "HEAD_TEACHER")
	private String headTeacher;

	/**
     * 创建人
     */
	@Column(name = "CREATOR")
	private String creator;

	/**
     * 创建时间
     */
	@Column(name = "CREATE_TIME")
	private Date createTime;

	/**
     * 删除标志
     */
	@Column(name = "REMOVE_TAG")
	private String removeTag;

	/**
	 * 分班id
	 */
	@Column(name = "DIVIDE_ID")
	private String divideId;

	/**
	 * 用户id
	 */
	@Column(name = "USER_ID")
	private String userId;

	/**
	 * 创建对象
	 *
	 * @param sysUser 当前用户信息
	 * @author caideyong
	 * @date 2019-12-20 13:54:04
	 */
	public DivideclassMessage(SysUser sysUser) {
		this.id = BaseUtil.uId();
		this.removeTag = DictCode.BASE_REMOVE_TAG_NORMAL;
		this.createTime = new Date();
		this.creator = sysUser.getId();
	}
}